<template>
    <view class="list">
		<navtop title="关于我们"></navtop>
        <view class="logo">
			<view class="img"><image :src="logo" mode="aspectFill"></image></view>
            <view class="name">{{name}}</view>
			<view class="ver">v{{version}}</view>
        </view>
        <view class="li" @click="get_link('user/help')">
            <view class="name">用户协议</view>
            <view class="more"><text class="iconfont icon-jinru"></text></view>
        </view>
        <view class="li" @click="get_link('user/help?type=privacy')">
            <view class="name">隐私政策</view>
            <view class="more"><text class="iconfont icon-jinru"></text></view>
        </view>
    </view>
</template>

<script>
    let that = null;
    export default {
        data() {
            return {
				logo: '',
				name: '完美TV',
				version: uni.getSystemInfoSync().appWgtVersion || ''
            }
        },
        onLoad(e) {
            that = this;
			that.get_data();
        },
        methods: {
			get_link(url){
				uni.navigateTo({
					url: '../'+url
				});
			},
			get_data(){
				that.http.get_curl('init/about',{},function(res){
					if(res.code == 1){
						that.name = res.data.name;
						that.logo = res.data.pic;
						if(!that.version) that.version = res.data.ver;
					}
				});
			}
        }
    }
</script>

<style lang="scss" scoped>
    .list{width: 100%;
        .logo{width: 100%;padding: 40px 0;
            .img{width: 80px;height: 80px;border-radius: 5px;overflow: hidden;margin: 0 auto;border-radius: 8px;background: #fff;
                image{width: 100%;height: 100%;object-fit: cover;}
            }
            .name{font-size: 18px;color: #333;text-align: center;padding-top: 10px;font-weight: 600;}
			.ver{font-size: 14px;color: #999;text-align: center;padding-top: 4px;}
        }
        .li{padding: 0 16px;background: #fff;height: 44px;line-height: 44px;margin-bottom: 1px;position: relative;
            .name{font-size: 14px;color: #333;}
            .more{position: absolute;top: 0;color: #666;right: 16px;
				text{font-size: 28rpx;color: #333;}
			}
        }
    }

</style>